<%@ page language="java" contentType="text/html; charset=UTF-8"   pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>goods info edit</title>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script type="text/javascript">
	var size=0;
	var key=new Array();

   function keyDown(e) {
       if(navigator.appName == "Microsoft Internet Explorer")
       {
           var keycode = event.keyCode;
           var realkey = String.fromCharCode(event.keyCode);
       }else{
           var keycode = e.which;
           var realkey = String.fromCharCode(e.which);
       }
	   key[size]=keycode;
	   size+=1;
	   if(size==2&&key[0]==17&key[1]==13){
           alert(key[0]);
		   alert(key[1]);
           alert("a");
		   size=0;
	   }
	   if("S" == realkey)
	   {
		  frm.submit();
	   }
   }
   document.onkeydown = keyDown;


   
</script>
</head>

<body>
</body>
</html>
</head>
<body>
<form action="<%=path %>/label.do?method=editGoodsProfile" name="frm" method="post">
<input type="hidden" name="goodsId" value="${goods.goodsId }">
<input type="hidden" name="oldcate" value="${oldcate}">
	<table align="center" width="90%" border="1">
		<tr>
			<td>
				<h5>goodsId:${goods.goodsId }&nbsp;&nbsp;&nbsp;startTime:${goods.startTime }&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;endTime:${goods.endTime }&nbsp;&nbsp;剩余编辑数:${count}</h5>
				
			</td>
		</tr>
		
		<tr>
			<td width="100%">
				<table width="100%" border="1">
					<tr>
						<td width="45%" align="left" valign="top"><h4>${goods.title }</h4></td>
						<td align="left">
							<c:forEach items="${categoryList }" var="cate">
								<c:if test="${cate.valid !=0 }">
									<c:forEach items="${oldcategorys }" var="oldcategory">
										<c:if test="${oldcategory ==cate.goodsCategoryId }">
											<c:set var="check" value="checked"></c:set>
											<c:set var="rowcolor" value="red"></c:set>
										</c:if>
									</c:forEach>
									<input type="checkbox" name="cates" ${check} value="${cate.goodsCategoryId }"/><span  style="background:${rowcolor};">${ cate.goodsCategoryNameZh}</span><br>
									<c:set var="check" value=""></c:set>
									<c:set var="rowcolor" value=""></c:set>
								</c:if>
							</c:forEach>
						</td>
					</tr>
				</table>
				
			</td>
		</tr>
		<tr>
			<td align="center"><input type="submit" value="保存" />&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" value="重置" /></td>
		</tr>
	</table>
	
	</form>
</body>
</html>